{% extends "common/layout_main.html" %}
{% block content %}
    <div class="row  border-bottom">
        <div class="col-lg-12">
           {% include 'common/tab_finance.html' %}
        </div>
    </div>
    <div class="row m-t wrap_info">
        <div class="col-lg-12">
            <div class="row">
                <div class="col-lg-12">
                    {% if pay_order_info.status==1 and pay_order_info.express_status == -7 %}
                        <button class="btn btn-w-m btn-outline btn-primary pull-right address_send"
                                data="{{ pay_order_info.id }}">确认发货
                        </button>
                    {% endif %}
                </div>
                <div class="col-lg-12">
                    <div class="m-b-md">
                        <h2>订单信息</h2>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <p class="m-t">订单编号：{{ pay_order_info.order_sn }}</p>
                    <p>会员姓名：{{ member.nickname }}</p>
                    <p>订单总价：{{ pay_order_info.total_price }}</p>
                    <p>订单状态：{{ pay_order_info.status_desc }}</p>
                    <p>创建时间：{{ pay_order_info.created_time }}</p>
                    <p>收货地址：{{ express_info['detail'] }}&nbsp;&nbsp;(联系电话：{{ express_info['mobile'] }})</p>
                </div>
            </div>
            <div class="row m-t">
                <div class="col-lg-12">
                    <div class="panel blank-panel">
                        <div class="panel-heading">
                            <div class="panel-options">
                                <ul class="nav nav-tabs">
                                    <li class="active">
                                        <a href="#tab-1" data-toggle="tab" aria-expanded="false">订单商品</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab-1">
                                    <table class="table table-striped">
                                        <thead>
                                        <tr>
                                            <th>商品</th>
                                            <th>数量</th>
                                            <th>金额</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {% if pay_order_items %}
                                            {% for item in pay_order_items %}
                                                <tr>
                                                    <td>{{ food_mapping[item.food_id].name }}</td>
                                                    <td>{{ item.quantity }}</td>
                                                    <td>{{ item.price }}</td>
                                                </tr>
                                            {% endfor %}
                                        {% else %}
                                            <tr>
                                                <td colspan="3">暂无数据</td>
                                            </tr>
                                        {% endif %}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/js/finance/info.js') }}"></script>
{% endblock %}
